Socket
Socket
Sign inDemoInstall

@material-ui/icons

Package Overview
Dependencies
Maintainers
8
Versions
56
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@material-ui/icons

Material Design Svg Icons converted to Material-UI React components.


Version published
Weekly downloads
900K
increased by5.7%
Maintainers
8
Weekly downloads
 
Created

What is @material-ui/icons?

The @material-ui/icons package provides a large set of icons designed by Google for use in web projects. These icons are part of the Material-UI ecosystem and are used to enhance the visual aesthetics and user experience of an application. They are available as React components and can be easily integrated into React applications.

What are @material-ui/icons's main functionalities?

Using Material Icons as React Components

This feature allows developers to import individual icons as React components and use them directly in their JSX code. The example shows how to import the AccessAlarm icon and render it in a React component.

import React from 'react';
import AccessAlarmIcon from '@material-ui/icons/AccessAlarm';

function MyApp() {
  return (
    <div>
      <AccessAlarmIcon />
    </div>
  );
}

export default MyApp;

Customizing Icon Styles

Icons can be styled using inline styles or CSS classes. The example demonstrates how to change the size and color of an icon using inline styles.

import React from 'react';
import AccessAlarmIcon from '@material-ui/icons/AccessAlarm';

function MyApp() {
  return (
    <div>
      <AccessAlarmIcon style={{ fontSize: 40, color: 'blue' }} />
    </div>
  );
}

export default MyApp;

Combining Icons with Material-UI Components

Icons can be combined with other Material-UI components such as buttons, navigation elements, and form controls. The example shows how to use an icon within a Material-UI IconButton component.

import React from 'react';
import IconButton from '@material-ui/core/IconButton';
import AccessAlarmIcon from '@material-ui/icons/AccessAlarm';

function MyApp() {
  return (
    <IconButton aria-label='alarm'>
      <AccessAlarmIcon />
    </IconButton>
  );
}

export default MyApp;

Other packages similar to @material-ui/icons

Keywords

FAQs

Package last updated on 03 Apr 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc